﻿<phone:PhoneApplicationPage 
     xmlns:local="clr-namespace:VodafoneWP7"
    local:TiltEffect.IsTiltEnabled="True"
    x:Class="VodafoneWP7.AccountsPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:controls="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls"
    xmlns:toolbox="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
    mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="696"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait"  Orientation="Portrait"
    shell:SystemTray.IsVisible="True" Loaded="PhoneApplicationPage_Loaded" >

    <!--LayoutRoot is the root grid where all page content is placed-->
    <Grid x:Name="LayoutRoot" Background="Transparent" >
        <!--Pivot Control-->
        <controls:Pivot Name="PivotControl" Title="{Binding Path=Strings.Title, Source={StaticResource LocalizedStrings }}">
            <!--Pivot item one-->
            <!--<controls:PivotItem  Name="AccountsListPivot" Header="{Binding Path=Strings.Accounts, Source={StaticResource LocalizedStrings }}">
                <Grid>

                    <ListBox Name="Accounts_List" SelectionMode="Single" VerticalContentAlignment="Center" HorizontalContentAlignment="Left" Grid.Row="0" SelectionChanged="Accounts_List_SelectionChanged">

                    </ListBox>
                </Grid>
            </controls:PivotItem>-->

            <!--Pivot item two-->
            <controls:PivotItem Name="EditAccountPivot" Header="{Binding Path=Strings.EditAccount, Source={StaticResource LocalizedStrings }}">
                <Grid>
                    <ScrollViewer>
                        <StackPanel Name="AccountForm" >
                          
                            <TextBlock Name="Name_Label" Text="{Binding Path=Strings.AccountName, Source={StaticResource LocalizedStrings }}"  FontSize="26" TextAlignment="Left" />
                            <TextBox Name="Name_Area" Text="{Binding Name, Mode=TwoWay}"  HorizontalAlignment="Stretch" AcceptsReturn="False" TextAlignment="Center" />

                            <TextBlock Name="Service_Label" Text="{Binding Path=Strings.MessaggingService, Source={StaticResource LocalizedStrings }}"  FontSize="26" TextAlignment="Left" />
                            <Border Name="MessaggingService_Border" BorderThickness="3" Padding="6" Margin="10,0,10,0" BorderBrush="#FFC4C4C4">
                                <toolbox:GestureService.GestureListener>
                                    <toolbox:GestureListener Tap="GestureListener_Tap"  />
                                </toolbox:GestureService.GestureListener>
                                <toolbox:ContextMenuService.ContextMenu>
                                    <toolbox:ContextMenu Name="MessaggingService_ContextMenu">
                                    </toolbox:ContextMenu>
                                </toolbox:ContextMenuService.ContextMenu>
                                <TextBlock Name="MessaggingService_Area" Text="{Binding MessagingService, Mode=TwoWay}"  FontSize="26" TextAlignment="Center"/>
                            </Border>

                            <TextBlock Name="Username_Label" Text="{Binding Path=Strings.Username, Source={StaticResource LocalizedStrings }}"  FontSize="26" TextAlignment="Left" />
                            <TextBox Name="Username_Area" Text="{Binding Username, Mode=TwoWay}" HorizontalAlignment="Stretch" AcceptsReturn="False" TextAlignment="Center" />
                            <TextBlock Name="Password_Label" Text="{Binding Path=Strings.Password, Source={StaticResource LocalizedStrings }}"  FontSize="26" TextAlignment="Left" />
                            <PasswordBox Name="Password_Area" PasswordChar="*" Password="{Binding Password, Mode=TwoWay}" HorizontalAlignment="Stretch" />

                            <toolbox:PerformanceProgressBar Name="ToggleProgressBar" Grid.Row="3" Height="30" Visibility="Collapsed" IsEnabled="False" IsIndeterminate="False" />


                            <toolbox:ToggleSwitch Name="SavePassword_Toggle" Header="{Binding Path=Strings.SavePassword, Source={StaticResource LocalizedStrings }}" IsChecked="{Binding SavePassword, Mode=TwoWay}" />

                            <Button Name="TestPassword_Button" HorizontalAlignment="Stretch" HorizontalContentAlignment="Center" Content="{Binding Path=Strings.TestPassword, Source={StaticResource LocalizedStrings }}" Click="TestPassword_Button_Click" IsEnabled="False"/>

                            
                            <TextBlock Name="Header_Label" Text="{Binding Path=Strings.Header, Source={StaticResource LocalizedStrings }}"  FontSize="26" TextAlignment="Left" />
                            <TextBox Name="Header_Area" Text="{Binding Header, Mode=TwoWay}" HorizontalAlignment="Stretch" AcceptsReturn="False" TextAlignment="Center" KeyUp="Header_Area_KeyUp"/>

                            <toolbox:ToggleSwitch Name="AllowHeader_Toggle" Header="{Binding Path=Strings.EnableHeader, Source={StaticResource LocalizedStrings }}" IsChecked="{Binding EnableHeader, Mode=TwoWay}"/>

                            <!--<toolbox:ToggleSwitch Name="AllowSignature_Toggle" Header="{Binding Path=Strings.EnableSignature, Source={StaticResource LocalizedStrings }}" IsChecked="{Binding EnableFooter, Mode=TwoWay}"/>-->

                            <!--<TextBlock Name="Signature_Label" Text="{Binding Path=Strings.Signature, Source={StaticResource LocalizedStrings }}"  FontSize="26" TextAlignment="Left" />
                            <TextBox Name="Signature_Area" Text="{Binding Footer, Mode=TwoWay}" HorizontalAlignment="Stretch" AcceptsReturn="False" TextAlignment="Center" KeyUp="Signature_Area_KeyUp"/>-->

                        </StackPanel>
                    </ScrollViewer>
                </Grid>
            </controls:PivotItem>
        </controls:Pivot>
    </Grid>

    <!--Sample code showing usage of ApplicationBar-->
    <phone:PhoneApplicationPage.ApplicationBar>
        <shell:ApplicationBar IsVisible="True" IsMenuEnabled="True">

            <shell:ApplicationBar.MenuItems>

            </shell:ApplicationBar.MenuItems>
        </shell:ApplicationBar>
    </phone:PhoneApplicationPage.ApplicationBar>

</phone:PhoneApplicationPage>